package ChangYongAPI;

import java.util.Objects;

public class A implements Cloneable
{
    String name;

    public A() {
    }

    public A(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "A{" +
                "name='" + name + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        A a = (A) o;
        return Objects.equals(name, a.name);
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(name);
    }

//    @Override
//    public boolean equals(Object obj) {
//        return super.equals(obj);
//    }


    @Override
    protected Object clone() throws CloneNotSupportedException {
        return (A)super.clone();
    }
}